var myec;
DrawStdLine = function (id,datas,title,subtitle) {
    myChart = echarts.init(document.getElementById(id));
    xdata = ['1月份', '2月份', '3月份', '4月份', '5月份', '6月份', '7月份', '8月份',
        '9月份', '10月份', '11月份', '12月份'];
    series = [];
    legend = [];
    obj={};
    for(i=0;i<datas.length;i++)
    {
        obj={};
        obj['name'] = datas[i].name;
        legend.push(datas[i].name);
        obj['type'] = 'line';
        obj['stack'] = '总量';
        obj['data'] = datas[i].value;
        series.push(obj);
    }
    option = {
        title: {
            text: title,
            x: 'center',
            subtext: subtitle
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: legend,
            orient: 'horizontal', // 布局方式，默认为水平布局，可选为：
            // 'horizontal' ¦ 'vertical'
            x: 'center', // 水平安放位置，默认为全图居中，可选为：
            // 'center' ¦ 'left' ¦ 'right'
            y: 'top',
            padding: 30
        },
        toolbox: {
            show: true,
            feature: {
                mark: {show: true},
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data : xdata
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: series
    };
    myChart.setOption(option);
}